feat(agentctl): governed web acquisition as first-class acquire command - #58
Merged
Conversation
…mand
Add `turtle-agentctl acquire --url <URL> [--account ..] [--tier ..]
[--seeds ..] [--enrich]` that routes through turtle-agentd to Agent
Machine's POST /api/acquire, mirroring the existing noetica-query
transport end to end.
- turtle-agentctl: new `acquire` subparser (--url required, --account,
--tier, --seeds repeatable/comma, --enrich) building
{"action":"acquire","url":..,"account_class":..,"tier":..,seeds?,enrich?};
top-of-file help updated.
- turtle-agentd: route action `acquire` -> POST {agent_machine_url}/api/acquire
with body {url, accountClass, tier, seeds?, enrich?}; writes a governed
receipt and fails closed (deny + status=error) when Agent Machine is
unreachable.
- skill manifest: add agent-machine.acquire command, web-acquisition
intentTag, and acquisition-provenance-receipt artifact output.
- tests: unit tests for the acquire route (mock POST to /api/acquire,
fail-closed, url-required) plus an end-to-end agentctl->agentd request
build/dispatch check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes governed web acquisition a first-class TurtleTerm command:
It routes through
turtle-agentdto Agent Machine'sPOST /api/acquire, which records a governed run and dispatches to the acquire-worker — failing closed when Agent Machine is unreachable. The path mirrors the existingnoetica-querytransport end to end; no new transport was invented.Changes
acquiresubparser (--urlrequired,--account,--tier,--seedsrepeatable/comma-separated,--enrich) that builds{"action":"acquire","url":..,"account_class":..,"tier":..,"seeds"?,"enrich"?}. Top-of-file help updated to listacquire.acquire→POST {agent_machine_url}/api/acquirewith body{url, accountClass, tier, seeds?, enrich?}(reusesagent_machine_url()/SOURCEOS_AGENT_MACHINE_URLand the shared_http_posthelper). Writes a governed receipt and returns the acquisition result + provenance/decision. Fail-closed: unreachable Agent Machine yieldsdecision=deny,status=error,status=blocked_offline, and no admission.turtle-agent-machine-bridge.json): addsagent-machine.acquirecommand,web-acquisitionintentTag, andacquisition-provenance-receiptartifact output./api/acquirewith the governed body; fail-closed on unreachable;--urlrequired) plus an end-to-endagentctl→agentdrequest-build/dispatch check.Verification
python -m pytest assets/sourceos/tests/test_turtle_agentd.py -q→ 8 passedpython -m py_compileon both scripts → OKkind=acquisition_result status=error reachable=False status_label=blocked_offline decision=denyNo existing tests were weakened.